<template>
	<view class="root">
		<!-- 活动 -->
<!-- 		<text>我的COSER活动\n</text>
		<view style="margin-left: 80rpx; ">
		<text style="color: red;" class="icon iconfont icon-shoucang">2019/11/11 天猫初音小漫直播\n</text>
		<text class="icon iconfont icon-shoucang">2020/1/27 信宜淘金湾漫展\n</text>
		<text style="color: red;" class="icon iconfont icon-shoucang">2020/9/19 个人COSER展会\n</text>
		<text class="icon iconfont icon-shoucang">2020/8/27参加抖音漫展活动</text>
		<view class="icon iconfont icon-shoucang">添加按钮</view>
		</view>
		<view style="border-bottom: 6rpx #999999 solid;width: 100%;"></view> -->
		<text>官群/添加</text>
		<!-- 功能 -->
		<view class="frieds">
		
			<view class="icon iconfont icon-shouye" style="display: flex;color: #ffffff; border-radius: 22rpx;height: 85rpx; background-color: #1c77ff; width: 85rpx; justify-content: center;font-size: 50rpx;align-items: center;"></view>
			<view style="display: flex;justify-content: space-between;width: 84%;">
				<text>
					<text class="users ">官方</text>
				</text>
			</view>
		</view>
		<view class="frieds" @click="shao">
			<view class="icon iconfont icon-tianjia" style="display: flex;color: #ffffff; border-radius: 22rpx;height: 85rpx; background-color: #ff4b34; width: 85rpx; justify-content: center;font-size: 50rpx;align-items: center;"></view>
			<view style="display: flex;justify-content: space-between;width: 84%;">
				<text>
					<text class="users ">新的盆友</text>
				</text>
			</view>
		</view>
		<view class="frieds">
			<view class="icon iconfont icon-jiedan" style="display: flex;color: #ffffff; border-radius: 22rpx;height: 85rpx; background-color: #c44eff; width: 85rpx; justify-content: center;font-size: 50rpx;align-items: center;"></view>
			<view style="display: flex;justify-content: space-between;width: 84%;">
				<text>
					<text class="users ">最近的交易</text>
				</text>
			</view>
		</view>
		
		<!-- 企业 -->
		<view class="frieds">
		
			<image src="../../static/prites/msg.jpg" mode="scaleToFill"></image>
			<view style="display: flex;justify-content: space-between;width: 84%;">
				<text>
					<text class="users">广州漫展(天河区)\n</text>
				</text>
			</view>
		</view>
		<view class="frieds">
		
			<image src="../../static/prites/msg.jpg" mode="scaleToFill"></image>
			<view style="display: flex;justify-content: space-between;width: 84%;">
				<text>
					<text class="users">东莞漫展(惠东区)\n</text>
				</text>
			</view>
		</view>
		<text>个人/自添</text>
		<!-- 列表 -->
		<view v-for="(item,index) in needUser" :key="index" sty>
			<list :user="item"></list>
		</view>
		<!-- 右上角 -->
	</view>
</template>

<script>
	import a from '../../js/request.js';
	// 引入组件wx
	import list from '../../components/listfriend.vue'
	var b = new a
	export default {
		data() {
			return {
				// 接受服务器
				needUser: [{
						src: '../../static/prites/1.jpg',
						name: '张琼雨',
					},
					{
						src: '../../static/prites/2.jpg',
						name: '黄彩琪',
					},
					{
						src: '../../static/prites/3.jpg',
						name: 'Tong',
					},
					{
						src: '../../static/prites/4.jpg',
						name: '朱小明'
					},
					{
						src: '../../static/prites/5.jpg',
						name: '林卫镇',
					},
					{
						src: '../../static/prites/6.jpg',
						name: '黄霞琪'
					},
					{
						src: '../../static/prites/4.jpg',
						name: '陈晨'
					},
					{
						src: '../../static/userpic/1.jpeg',
						name: 'Cheney'
					}
				]
			};
		},
		methods: {
			// 摄像头
			shao() {
				uni.scanCode({
					success: function(res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
					}
				});
			},
			// 跳转
			liao() {
				console.log("tiaozhuang")
				uni.navigateTo({
					url: "../../pageA/liaotiao/liaotiao",

				})
			},
			// 右上角的事件
			onNavigationBarButtonTap(val) {
				if (val.index == 1) {
					this.shao()
				}
			}
		},
		// 注册
		components: {
			list
		},
		// 右上角的事件
		onNavigationBarButtonTap(val) {
			if (val.index == 1) {
			uni.scanCode({
			    success: function (res) {
			        console.log('条码类型：' + res.scanType);
			        console.log('条码内容：' + res.result);
			    }
			});
			}
		}
	}
</script>

<style lang="less">
	.root
	{
		width: 96%;
		margin: 0 auto;
	}
	// 企业
	.frieds {
		width: 96%;
		// margin: 2%;
		margin: 0 auto;
		height: 100rpx;
		line-height: 150rpx;
		// background-color: red;
		border-bottom: 1px solid #D9D9D9;
		// padding-bottom: 8px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		image {
			width: 80rpx;
			height: 80rpx;
			border-radius: 20rpx;
		}
		view
		{
			.users{
				font-size: 34rpx;
				font-weight: bolder;
			}
			.time
			{
				font-size: 24rpx;
				color: #b0b0b0;
			}
			.crx
			{
				font-size: 25rpx;
				color: #b0b0b0;
			}
		}
		
	}
	
	.xin {
		z-index: 199;
		width: 0;
		height: 0;
		border: 20rpx solid;
		border-color: transparent transparent #333333 transparent;
		position: fixed;
		right: 2%;
		// opacity: .8;
		top: -20rpx;
	}

	.bt {
		z-index: 99;
		position: fixed;
		right: 1.8%;
		top: 18rpx;
		background-color: #333333;
		color: #EBECEB;
		width: 35%;
		font-size: 38rpx;
		border-radius: 10rpx;

		text {
			margin-left: 4%;
			letter-spacing: 13rpx;
		}
	}
</style>
